<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>宝可梦图鉴</title>
    <link rel="stylesheet" href="css/Pokémon Illustrated.css">
</head>
<body>
<div id="show">
    <header>
        <img id="logo" src="imgs/register.png" alt="logo">
        <p id="title">宝可梦大全</p>
    </header>
    <main>


        <div id="introduce">
            <table id="content">
                <thead>
                <tr>
                    <th>编号</th>
                    <th>宝可梦名称</th>
                    <th>元素属性</th>
                    <th>招牌技能</th>
                    <th>发现地</th>
                    <th>录入时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${pokemons}" var="pokemon" varStatus="status">
                    <tr align="center">
                        <td>${pokemon.id}</td>
                        <td>${pokemon.name}</td>
                        <td>${pokemon.type}</td>
                        <td>${pokemon.skill}</td>
                        <td>${pokemon.describe}</td>
                        <td>${pokemon.time}</td>

                        <td><a href="/untitled_war/selectpokemonbyidServlet?id=${pokemon.id}">修改</a> <a href="/untitled_war/deletepokemonServlet?id=${pokemon.id}">删除</a></td>
                    </tr>

                </c:forEach>
                </tbody>
            </table>
        </div>
        <div class="table-container">
        <table>
            <tr>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
                <th>地区</th>
                <th>操作</th>
            </tr>
            <c:forEach items="${trainers}" var="trainer" varStatus="status">

                <tr>
                    <td>${trainer.name}</td>
                    <td>${trainer.sex}</td>
                    <td>${trainer.age}</td>
                    <td>${trainer.area}</td>
                    <td><a href="/untitled_war/selecttrainerbyidServlet?id=${trainer.id}"><button id="editButton">修改</button></a>       <a href="/untitled_war/deletetrainerServlet?id=${trainer.id}"><button id="editButton">删除</button></a></td>
                </tr>
            </c:forEach>
        </table>
        </div>
    </main>
</div>
<div class="sidebar">
    <h2>菜单栏</h2>
    <ul>
        <li><a href="indexServlet">首页</a></li>
        <li><a href="pokemonallServlet">管理宝可梦</a></li>
        <li><a href="trainerallServlet">管理训练师</a></li>
        <img src="imgs/qiu.png">
    </ul>
</div>
</body>
</html>
